home *** CD-ROM | disk | FTP | other *** search
- PXFSETGID(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFSSEETTGGIIDD - Sets group ID
-
- SSYYNNOOPPSSIISS
- SSUUBBRROOUUTTIINNEE PPXXFFSSEETTGGIIDD ((_i_g_i_d,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_g_i_d,, _i_e_r_r_o_r
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFSSEETTGGIIDD routine uses the sseettggiidd(2) function to set the real
- group ID, effective group ID, and saved-set group IDs of the calling
- process. The following conditions determine the setting of an ID.
- They are checked in the following order, and the first condition that
- is true is applied:
-
- * If the process has appropriate privilege, the real, effective, and
- saved-set group IDs are all set to _i_g_i_d.
-
- * If ID is equal to either the real group ID, the effective group ID,
- or the saved-set, group ID is set to _i_g_i_d.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this routine:
-
- _i_g_i_d An input integer variable used to replace the current group
- ID for the calling process.
-
- _i_e_r_r_o_r An output integer variable that contains zero if PPXXFFSSEETTGGIIDD
- was successful. or nonzero if PPXXFFSSEETTGGIIDD was not successful.
-
- PPXXFFSSEETTGGIIDD may return EEIINNVVAALL if the value of the _i_g_i_d argument is out
- of range or EEPPEERRMM if the process does not have the appropriate
- privileges and _i_g_i_d does not match the real user ID.
-
- NNOOTTEESS
- On a UNICOS multilevel security (MLS) system, a process with the
- effective privileges shown is granted the following abilities:
-
- PPrriivviilleeggee DDeessccrriippttiioonn
-
- PPRRIIVV__SSEETTGGIIDD The process may set the real group ID,
- effective group ID, and saved set-group-ID.
-
- On a UNICOS non-MLS system or a UNICOS MLS system with PPRRIIVV__SSUU
- enabled, the super user may set the real group ID, effective group ID,
- and saved set-group-ID.
-
- EEXXAAMMPPLLEESS
- In this example, the current user ID for the current process will be
- obtained by calling PPXXFFGGEETTGGIIDD and then setting the group ID for the
- current process by using the group ID returned by PPXXFFGGEETTGGIIDD.
-
- program pxftest
- integer igid, ierror
-
- CALL PXFGETGID(igid, ierror)
- if (ierror .eq. 0) then
- CALL PXFSETGID(igid, ierror)
- if (ierror .eq. 0) then
- print *,'group id set to ',igid
- else
- print *,'group id not set to ',igid,' because of error'
- endif
- else
- print *,'could not obtain user ID error = ',ierror
- endif
- end
-
- SSEEEE AALLSSOO
- sseettggiidd(2)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-